package com.company.pangu.aliyun.ocr.response;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * <p>营业执照识别响应</p >
 *
 * @author youyoukele
 * @version 1.0
 * @date 2023/4/6 下午6:20
 */
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class RecognizeBusinessLicenseResponse implements Serializable {

    /**
     * data : {"creditCode":"913301095U78M2HC4A","companyName":"杭州橘子文化传媒有限公司","companyType":"有限责任公司(自然人投资或控股)","businessAddress":"萧山区宁围街道泰宏巷40号联合中心北区","legalPerson":"陈云平","businessScope":"影视文化艺术活动策划，艺术造型、美术设计，影视道具与服装设计：影视制作技术的研发；会议及展览服务；企业形象策划、影视文化信息咨询、摄影、摄像服务(除冲扩)：设计、制作、代理国内广告(除网络广告)：艺人经纪服务(营业性演出除外)：公关策划：网站建设、软硬件开发维护、技术服务：销售：化妆品(除分装)、日用百货、服装、玩具、母婴用品(除食品药品)、第二类医疗器械**(依法须经批准的项目，经相关部门批准后方可开展经营活动)","registeredCapital":"壹佰万元整","RegistrationDate":"2017年01月04日","validPeriod":"2017年01月04日至长期","validFromDate":"20170104","validToDate":"29991231","companyForm":""}
     * figure : [{"type":"round_stamp","x":379,"y":642,"w":111,"h":109,"box":{"x":433,"y":695,"w":108,"h":106,"angle":0},"points":[{"x":379,"y":642},{"x":487,"y":642},{"x":488,"y":749},{"x":379,"y":749}]},{"type":"round_stamp","x":364,"y":71,"w":117,"h":116,"box":{"x":421,"y":128,"w":115,"h":114,"angle":0},"points":[{"x":364,"y":71},{"x":479,"y":71},{"x":479,"y":185},{"x":364,"y":185}]},{"type":"qrcode","x":52,"y":587,"w":97,"h":98,"box":{"x":100,"y":635,"w":95,"h":94,"angle":-89},"points":[{"x":52,"y":683},{"x":53,"y":587},{"x":147,"y":587},{"x":147,"y":683}]},{"type":"blicense_title","x":122,"y":195,"w":304,"h":65,"box":{"x":273,"y":226,"w":301,"h":59,"angle":0},"points":[{"x":122,"y":199},{"x":423,"y":195},{"x":424,"y":254},{"x":123,"y":258}]},{"type":"national_emblem","x":222,"y":73,"w":102,"h":110,"box":{"x":272,"y":127,"w":99,"h":106,"angle":0},"points":[{"x":222,"y":74},{"x":322,"y":73},{"x":322,"y":180},{"x":222,"y":181}]}]
     * ftype : 1
     * height : 829
     * orgHeight : 829
     * orgWidth : 564
     * prism_keyValueInfo : [{"key":"creditCode","keyProb":100,"value":"913301095U78M2HC4A","valuePos":[{"x":498,"y":262},{"x":499,"y":273},{"x":337,"y":275},{"x":336,"y":263}],"valueProb":100},{"key":"companyName","keyProb":100,"value":"杭州橘子文化传媒有限公司","valuePos":[{"x":321,"y":319},{"x":321,"y":334},{"x":161,"y":334},{"x":161,"y":319}],"valueProb":100},{"key":"companyType","keyProb":100,"value":"有限责任公司(自然人投资或控股)","valuePos":[{"x":378,"y":341},{"x":378,"y":357},{"x":161,"y":357},{"x":161,"y":341}],"valueProb":100},{"key":"businessAddress","keyProb":98,"value":"萧山区宁围街道泰宏巷40号联合中心北区","valuePos":[{"x":160,"y":359},{"x":380,"y":358},{"x":381,"y":371},{"x":161,"y":373}],"valueProb":98},{"key":"legalPerson","keyProb":100,"value":"陈云平","valuePos":[{"x":208,"y":388},{"x":208,"y":404},{"x":163,"y":404},{"x":163,"y":388}],"valueProb":100},{"key":"businessScope","keyProb":100,"value":"影视文化艺术活动策划，艺术造型、美术设计，影视道具与服装设计：影视制作技术的研发；会议及展览服务；企业形象策划、影视文化信息咨询、摄影、摄像服务(除冲扩)：设计、制作、代理国内广告(除网络广告)：艺人经纪服务(营业性演出除外)：公关策划：网站建设、软硬件开发维护、技术服务：销售：化妆品(除分装)、日用百货、服装、玩具、母婴用品(除食品药品)、第二类医疗器械**(依法须经批准的项目，经相关部门批准后方可开展经营活动)","valuePos":[{"x":163,"y":484},{"x":810,"y":484},{"x":810,"y":619},{"x":163,"y":619}],"valueProb":99},{"key":"registeredCapital","keyProb":100,"value":"壹佰万元整","valuePos":[{"x":227,"y":413},{"x":227,"y":429},{"x":162,"y":429},{"x":162,"y":413}],"valueProb":100},{"key":"RegistrationDate","keyProb":100,"value":"2017年01月04日","valuePos":[{"x":277,"y":438},{"x":277,"y":452},{"x":163,"y":454},{"x":162,"y":439}],"valueProb":100},{"key":"validPeriod","keyProb":100,"value":"2017年01月04日至长期","valuePos":[{"x":333,"y":463},{"x":333,"y":478},{"x":162,"y":478},{"x":162,"y":463}],"valueProb":100},{"key":"validFromDate","keyProb":100,"value":"20170104","valuePos":[{"x":333,"y":463},{"x":333,"y":478},{"x":162,"y":478},{"x":162,"y":463}],"valueProb":100},{"key":"validToDate","keyProb":100,"value":"29991231","valuePos":[{"x":333,"y":463},{"x":333,"y":478},{"x":162,"y":478},{"x":162,"y":463}],"valueProb":100},{"key":"companyForm","keyProb":100,"value":"","valueProb":100}]
     * sliceRect : {"x0":9,"y0":30,"x1":535,"y1":30,"x2":537,"y2":778,"x3":11,"y3":780}
     * width : 564
     */

    @JsonProperty("data")
    private Data data;
    @JsonProperty("ftype")
    private int ftype;
    @JsonProperty("height")
    private int height;
    @JsonProperty("orgHeight")
    private int orgHeight;
    @JsonProperty("orgWidth")
    private int orgWidth;
    @JsonProperty("sliceRect")
    private SliceRect sliceRect;
    @JsonProperty("width")
    private int width;
    @JsonProperty("figure")
    private List<Figure> figure;
    @JsonProperty("prism_keyValueInfo")
    private List<PrismKeyValueInfo> prismKeyValueInfo;


    @lombok.Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class Data {
        /**
         * creditCode : 913301095U78M2HC4A
         * companyName : 杭州橘子文化传媒有限公司
         * companyType : 有限责任公司(自然人投资或控股)
         * businessAddress : 萧山区宁围街道泰宏巷40号联合中心北区
         * legalPerson : 陈云平
         * businessScope : 影视文化艺术活动策划，艺术造型、美术设计，影视道具与服装设计：影视制作技术的研发；会议及展览服务；企业形象策划、影视文化信息咨询、摄影、摄像服务(除冲扩)：设计、制作、代理国内广告(除网络广告)：艺人经纪服务(营业性演出除外)：公关策划：网站建设、软硬件开发维护、技术服务：销售：化妆品(除分装)、日用百货、服装、玩具、母婴用品(除食品药品)、第二类医疗器械**(依法须经批准的项目，经相关部门批准后方可开展经营活动)
         * registeredCapital : 壹佰万元整
         * RegistrationDate : 2017年01月04日
         * validPeriod : 2017年01月04日至长期
         * validFromDate : 20170104
         * validToDate : 29991231
         * companyForm :
         */

        @JsonProperty("creditCode")
        private String creditCode;
        @JsonProperty("companyName")
        private String companyName;
        @JsonProperty("companyType")
        private String companyType;
        @JsonProperty("businessAddress")
        private String businessAddress;
        @JsonProperty("legalPerson")
        private String legalPerson;
        @JsonProperty("businessScope")
        private String businessScope;
        @JsonProperty("registeredCapital")
        private String registeredCapital;
        @JsonProperty("RegistrationDate")
        private String RegistrationDate;
        @JsonProperty("validPeriod")
        private String validPeriod;
        @JsonProperty("validFromDate")
        private String validFromDate;
        @JsonProperty("validToDate")
        private String validToDate;
        @JsonProperty("companyForm")
        private String companyForm;

    }

    @lombok.Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class SliceRect {
        /**
         * x0 : 9
         * y0 : 30
         * x1 : 535
         * y1 : 30
         * x2 : 537
         * y2 : 778
         * x3 : 11
         * y3 : 780
         */

        @JsonProperty("x0")
        private int x0;
        @JsonProperty("y0")
        private int y0;
        @JsonProperty("x1")
        private int x1;
        @JsonProperty("y1")
        private int y1;
        @JsonProperty("x2")
        private int x2;
        @JsonProperty("y2")
        private int y2;
        @JsonProperty("x3")
        private int x3;
        @JsonProperty("y3")
        private int y3;

    }

    @lombok.Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class Figure {
        /**
         * type : round_stamp
         * x : 379
         * y : 642
         * w : 111
         * h : 109
         * box : {"x":433,"y":695,"w":108,"h":106,"angle":0}
         * points : [{"x":379,"y":642},{"x":487,"y":642},{"x":488,"y":749},{"x":379,"y":749}]
         */

        @JsonProperty("type")
        private String type;
        @JsonProperty("x")
        private int x;
        @JsonProperty("y")
        private int y;
        @JsonProperty("w")
        private int w;
        @JsonProperty("h")
        private int h;
        @JsonProperty("box")
        private Box box;
        @JsonProperty("points")
        private List<Points> points;


        @lombok.Data
        @JsonIgnoreProperties(ignoreUnknown = true)
        public static class Box {
            /**
             * x : 433
             * y : 695
             * w : 108
             * h : 106
             * angle : 0
             */

            @JsonProperty("x")
            private int x;
            @JsonProperty("y")
            private int y;
            @JsonProperty("w")
            private int w;
            @JsonProperty("h")
            private int h;
            @JsonProperty("angle")
            private int angle;

        }

        @lombok.Data
        @JsonIgnoreProperties(ignoreUnknown = true)
        public static class Points {
            /**
             * x : 379
             * y : 642
             */

            @JsonProperty("x")
            private int x;
            @JsonProperty("y")
            private int y;

        }
    }

    @lombok.Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class PrismKeyValueInfo {
        /**
         * key : creditCode
         * keyProb : 100
         * value : 913301095U78M2HC4A
         * valuePos : [{"x":498,"y":262},{"x":499,"y":273},{"x":337,"y":275},{"x":336,"y":263}]
         * valueProb : 100
         */

        @JsonProperty("key")
        private String key;
        @JsonProperty("keyProb")
        private int keyProb;
        @JsonProperty("value")
        private String value;
        @JsonProperty("valueProb")
        private int valueProb;
        @JsonProperty("valuePos")
        private List<ValuePos> valuePos;

        @lombok.Data
        @JsonIgnoreProperties(ignoreUnknown = true)
        public static class ValuePos {
            /**
             * x : 498
             * y : 262
             */

            @JsonProperty("x")
            private int x;
            @JsonProperty("y")
            private int y;

        }

    }
}
